#ifndef __HAL_CS_F71_AFE_H
#define __HAL_CS_F71_AFE_H
#include "compile_option.h"
#include "hal_cs_f71_framework.h"
#include "hal_ndt_common.h" 
typedef enum{
	PGA_1 = 0x01,
	PGA_2 = 0x00, 
} PGA_x_TypeDef;


/* CHANNEL MUX */
#define AINP0		(0)
#define AINP1		(1)
#define AINP2		(2)
#define AINP3		(3)
#define AINP4		(4)
#define AINP5		(5)
#define AINP6		(6)
#define AINP7		(7)
#define AINP8		(8)
#define AINP9		(9)
#define AINP10		(10)
#define AINP11		(11)
#define AINP12		(12)
#define AINP13		(13)
#define AINP14		(14)
#define AINP15		(15)

#define CHANNEL_CHECK_DETAIL_CNT 6

//////////////////////////////////////////////////////////////////////////////
void afe_init_config(void);
extern void HAL_AFE_Init(void);
uint16_t hal_adc_get(uint8_t pin_num);
void hal_dac_set(uint8_t pin_num, uint16_t dac_offset);
uint16_t hal_dac_get(uint8_t pin_num);
extern void hal_wait_sample_finished(uint8_t ch_count);
extern void hal_afe_enable(void);
extern void hal_afe_disable(void);
extern void hal_channel_check(uint8_t ch_count);

#endif	/* __HAL_CS_F71_AFE_H */


